<?php
namespace app\admin\validate;

use think\Validate;

class Customer extends Validate {

    protected $rule = [
        'real_name'         => 'require',
        'mobile'            => 'require',
        'birthday'          => 'dateFormat:Y-m-d',
    ];

    protected $message  =   [
        'real_name'         => '真实姓名不能为空',
        'mobile'            => '联系电话不能为空',
        'birthday'          => '',
    ];

    protected $scene = [
        'updateCustomer'    => ['real_name', 'mobile'],
        'birthdayVerify'    => ['birthday'],
        'insertCustomer'    => ['real_name', 'mobile'],
    ];
}